import random
teacher=['t1','t2','t3','t4','t5','t6','t7','t8']
offices=[[],[],[]]
for name in teacher:
    ran=random.randint(0,len(offices)-1)
    offices[ran].append(name)
i=1
for office in offices:
    num=len(office)
    print(f'办公室{i},人数是:{len(office)},具体是：')
    for name in office:
        print(name,end='\t')
    print()
    i=i+1;

for i in range(len(offices)):
    print(f'办公室{i},人数是:{len(office[i])},具体是：')
    for name in offices[i]:
        print(name,end='\t')
    print()


